package sg.edu.nus.iss.billing.model.subscription;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import sg.edu.nus.iss.billing.model.charge.IChargable;

/**
 * @author Ananda, Saravana, BeeHong
 *
 */
public class Service implements ISubscribable, Serializable {
	
	private static final long serialVersionUID = 1L;

	private List<IChargable> charges;
	
	private String serviceId = null;
	private String dateCommenced = null;
	private String dateTerminated = null;
	
	public Service() {
		super();
		this.charges = new ArrayList<IChargable>();
	}
	
	public Service(String serviceId) {
		this.serviceId = serviceId;
		this.charges = new ArrayList<IChargable>();
	}
	
	public String getServiceId(){
		return serviceId;
	}
	
	public void setServiceId(String serviceId){
		this.serviceId = serviceId;
	}
	
	public String getDateCommenced(){
		return dateCommenced;
	}
	
	public void setDateCommenced(String dateCommenced){
		this.dateCommenced = dateCommenced;
	}
	
	public String getDateTerminated(){
		return dateTerminated;
	}
	
	public void setDateTerminated(String dateTerminated){
		this.dateTerminated = dateTerminated;
	}
	
	public void setCharges(List<IChargable> list) {
		this.charges.addAll (list);
	}
	
	public List<IChargable> getCharges() {
		return this.charges;
		
	}
	
	public void clearCharges() {
		this.charges.clear();
	}

}
